class Solution {
public:
    int singleNumber(vector<int>& nums)
    {
        int tmp = 0;
        for (int i = 0; i < 32; i++)
        {
            int t = 0;
            for (auto x : nums)
            {
                t += x >> i & 1;
            }
            if (t % 3 == 1)
            {
                tmp |= 1 << i;
            }

        }
        return tmp;






    }
};